<?php
  foreach ($user as $l) {
    $nama = $l->nama;
    $img = $l->pict; 
   } 

?>
<div class="headerbar">
      
      <a class="menutoggle"><i class="fa fa-bars"></i></a>
           
      <div class="header-right">
        <ul class="headermenu">
          
          <li>
            <div class="btn-group">
              <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                <img src="<?php echo base_url('source/upload/staff/'.$img);?>" alt="" />
                <?php echo $nama?>
                <span class="caret"></span>
              </button>
              <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                <li><a href="<?php echo base_url('profile')?>"><i class="glyphicon glyphicon-user"></i> My Profile</a></li>
                <li><a href="#"><i class="glyphicon glyphicon-cog"></i> Account Settings</a></li>
                <li><a href="<?php echo base_url('auth/logout');?>"><i class="glyphicon glyphicon-log-out"></i> Log Out</a></li>
              </ul>
            </div>
          </li>
        </ul>
      </div><!-- header-right -->
      
    </div>